﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Optimization;

namespace WinnerCMS.WebFactory.Bundles
{
    public class CMSBundleBuilder : IBundleBuilder
    {
        public string BuildBundleContent(System.Web.Optimization.Bundle bundle, BundleContext context, IEnumerable<BundleFile> files)
        {
            StringBuilder sb = new StringBuilder();
            files.ToList().ForEach(x =>
            {
                sb.Append(x.ApplyTransforms());
            });

            return sb.ToString();
        }
    }
}
